package com.wulijie.decorate;

/**
 * @Author cui
 * @Data
 */
public class Decorator extends Drink{
    private Drink drink;

    public Decorator(Drink drink) {
        this.drink = drink;
    }

    @Override
    public String getName() {
        return this.drink.getName() + super.getName();
    }

    @Override
    float cost() {
        return this.drink.cost() + super.getPrice();
    }
}
